<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>书籍类别添加</title>
</head>
<body>
	<form action="">
		<table width="100%" border="0">
			<tr>
				<td colspan="5">导航:
						<b style="cursor: pointer;" onclick="changeContent('/control/mapping/type_typeList.go','typeId=')">顶级目录</b>
					<s:iterator var="item" value="mapNavigation">
						>>
							<b style="cursor: pointer;" onclick="changeContent('/control/mapping/type_typeList.go','typeId=${item.key}')">${item.value}</b>
						<input type="hidden" id="book_type_id" value="#item.key">
						<input type="hidden" id="book_type_name" value="#item.value">
					</s:iterator>
				</td>
			</tr>
			<tr>
				<s:iterator value="types" var="_type" status="loop">
				<td>
					<input type="radio" name="bookType" onclick="javaScript:setValue('${_type.id}','${_type.name}')">
					<c:if test="${fn:length(_type.types)>0}">
						<b style="cursor: pointer;vertical-align: middle;">
						<a onclick="changeContent('/control/mapping/type_typeList.go','typeId=${_type.id}')">
							${_type.name}
						</a>
						<img alt="修改" src="/image/admin/edit.gif" style="cursor: pointer;"  onclick="editNameUI('${_type.id}','${_type.parent.id}','${_type.name}','${_type.remark}')">
						</b>
					</c:if>
					<c:if test="${fn:length(_type.types)==0}">
						${_type.name}&nbsp;
						<img alt="修改" src="/image/admin/edit.gif" style="cursor: pointer;" onclick="editNameUI('${_type.id}','${_type.parent.id}','${_type.name}','${_type.remark}')">
					</c:if>
					</td>
					<c:if test="${loop.count%5==0}"></tr><tr></c:if>
				</s:iterator>
			</tr>
			<tr>
				<td colspan="5" align="center">
					<input type="button" value="添加" onclick="test()">
					<input type="button" value="生成索引" onclick="search()">
				</td>
			</tr>
		</table>
	</form>
</body>
</html>